package fun.lifepoem.blog.controller;

import fun.lifepoem.blog.common.RestResponse;
import fun.lifepoem.blog.common.annotation.ApiCtlLog;
import fun.lifepoem.blog.controller.base.BaseController;
import fun.lifepoem.blog.domain.vo.TagVO;
import fun.lifepoem.blog.service.TagService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Yiwyn
 * @create 2022/9/25 0:09
 */
@RestController
@RequestMapping("/tag")
public class TagController extends BaseController {

    @Autowired
    private TagService tagService;

    @ApiCtlLog
    @GetMapping("/list")
    public RestResponse<List<TagVO>> getTagList() {
        List<TagVO> tagList = tagService.getTagList();
        return doSuccess(tagList);
    }

    @ApiCtlLog
    @PostMapping("/add")
    public RestResponse<String> addTag() {
        return null;
    }

}
